package com.rongmei.jdsync.service.impl;

import com.rongmei.jdsync.entity.SkuData;
import com.rongmei.jdsync.repository.SkuDataRepository;
import com.rongmei.jdsync.service.SkuDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author dongjun
 */
@Service
@Slf4j
public class SkuDataServiceImpl implements SkuDataService {

    private final SkuDataRepository skuDataRepository;

    public SkuDataServiceImpl(SkuDataRepository skuDataRepository) {
        this.skuDataRepository = skuDataRepository;
    }

    /**
     * 保存所有SKU数据
     *
     * @param skuDataList 要保存的SKU数据列表
     */
    @Override
    public void saveAll(List<SkuData> skuDataList) {
        skuDataRepository.saveAll(skuDataList);
    }
}
